<template>
  <div>
    <van-button
      type="primary"
      size="small"
      :style="getStyle"
      :color="getStyle"
      >{{ item.name }}</van-button
    >
  </div>
</template>

<script>
export default {
  name: "VantSearchbutton",

  data() {
    return {};
  },

  mounted() {},
  props: {
    item: {
      type: Object,
    },
  },
  methods: {},
  computed: {
    getStyle() {
      // let R = Math.floor(Math.random() * 255);
      // let G = Math.floor(Math.random() * 255);
      // let B = Math.floor(Math.random() * 255);
      // return {
      //   background: 'rgb(' + R + ',' + G + ',' + B + ')'
      // };
      //   let backGround = ["#1989FA", "#07C160", "#EE0A24", "#ED6AOC", "#11A0AD"];
      //   let index = Math.floor(Math.random() * backGround.length);
      //   let bg = backGround[index];
      //   return bg;
      let R = Math.floor(Math.random() * 255);
      let G = Math.floor(Math.random() * 255);
      let B = Math.floor(Math.random() * 255);
      return "rgb(" + R + "," + G + "," + B + ")";
    },
  },
};
</script>

<style  scoped>
.van-button {
  margin: 0 0.133333rem;
  display: inline;
}
</style>